-- GENERATED SPELL FOR [Anchorite Tessa] --


function spell0_31054(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(34945,pUnit)
pUnit:RegisterEvent('Sorts_31054', 3500, 1)
end

function spell1_31054(pUnit, Event) --@Holy Nova,Self--
pUnit:FullCastSpellOnTarget(34944,pUnit)
pUnit:RegisterEvent('Sorts_31054', 559, 1)
end

function spell2_31054(pUnit, Event) --@Power Word: Shield,n/a--
pUnit:FullCastSpellOnTarget(17139,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31054', 30323, 1)
end

function Sorts_31054(pUnit, Event)
local choix_sorts_31054 = math.random(0, 2)
if choix_sorts_31054 == 0 then
pUnit:RegisterEvent('spell0_31054', 1, 1)
end
if choix_sorts_31054 == 1 then
pUnit:RegisterEvent('spell1_31054', 1, 1)
end
if choix_sorts_31054 == 2 then
pUnit:RegisterEvent('spell2_31054', 1, 1)
end
end

function mob31054_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31054', math.random(1500, 3000), 1)
end

function mob31054_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31054_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31054_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31054, 1, 'mob31054_Action')
RegisterUnitEvent(31054, 2, 'mob31054_Leave')
RegisterUnitEvent(31054, 3, 'mob31054_Kill')
RegisterUnitEvent(31054, 4, 'mob31054_Die')
